define([],function(){
	var tpl = {};

	tpl.datatableForm = function(){
		var h = "";
		h += datatableForm();
		h += datatableForm_comm();
		h += datatableForm_age();
		h += datatableForm_1();
		h += datatableForm_2();
		h += datatableForm_3();
		h += datatableForm_serchBtn();
		return h;
	}
	tpl.datatableBox = function(){
		return datatableBox();
	}

	var datatableForm = function() {
		return 	'<script id="tpl_selfRecordList_datatableForm" type="text/html">'+
				'	{{if kind=="1"}}'+
				'		{{include "tpl_selfRecordList_datatableForm_1",value}}'+
				'		{{include "tpl_selfRecordList_datatableForm_serchBtn",value}}'+
				'	{{else if kind=="2"}}'+
				'		{{include "tpl_selfRecordList_datatableForm_2",value}}'+
				'		{{include "tpl_selfRecordList_datatableForm_serchBtn",value}}'+
				'	{{else if kind=="3"}}'+
				'		{{include "tpl_selfRecordList_datatableForm_3",value}}'+
				'		{{include "tpl_selfRecordList_datatableForm_serchBtn",value}}'+
				'	{{/if}}'+
				'</script>';
	}
	var datatableForm_comm = function() {
		return 	'<script id="tpl_selfRecordList_datatableForm_comm" type="text/html">'+
				'		<div class="dt-card form-group grid-label-4">'+
				'		    <label for="hisNo" class="control-label">档案编号</label>'+
				'		    <div class="control-input">'+
				'		      	<input name="hisNo" type="text" class="form-control" placeholder="">'+
				'		    </div>'+
				'		</div>'+
				'		<div class="dt-card form-group grid-label-2">'+
				'		    <label for="userName" class="control-label">姓名</label>'+
				'		    <div class="control-input">'+
				'		      	<input name="userName" type="text" class="form-control" placeholder="">'+
				'		    </div>'+
				'		</div>'+
				'		<div class="dt-card form-group grid-label-4">'+
				'		    <label for="phoneNo" class="control-label">联系方式</label>'+
				'		    <div class="control-input">'+
				'		      	<input name="phoneNo" type="text" class="form-control" placeholder="">'+
				'		    </div>'+
				'		</div>'+
				'</script>';
	}
	var datatableForm_age = function() {
		return 	'<script id="tpl_selfRecordList_datatableForm_age" type="text/html">'+
				'	<div class="dt-card form-group grid-label-2">'+
				'	    <label class="control-label">年龄</label>'+
				'	    <div class="control-input clearfix">'+
				'		    <div class="grid-range">'+
				'		      	<input name="ageFrom" type="text" class="form-control" placeholder="岁">'+
				'		    </div>'+
				'		    <div class="grid-range grid-range-i">'+
				'		      	<i>-</i>'+
				'		    </div>'+
				'		    <div class="grid-range">'+
				'		      	<input name="ageTo" type="text" class="form-control" placeholder="岁">'+
				'		    </div>'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	var datatableForm_1 = function() {
		return 	'<script id="tpl_selfRecordList_datatableForm_1" type="text/html">'+
				'		{{include "tpl_selfRecordList_datatableForm_comm",value}}'+
				'		<div class="dt-card form-group grid-label-2">'+
				'		    <label for="gender" class="control-label">性别</label>'+
				'		    <div class="control-input radio">'+
				'		      	<label class="radio-inline"><input name="gender" type="radio" value="M">男</label>'+
				'		      	<label class="radio-inline"><input name="gender" type="radio" value="F">女</label>'+
				'		    </div>'+
				'		</div>'+
				'		<div class="dt-card form-group grid-label-4">'+
				'		    <label for="" class="control-label">出生日期</label>'+
				'		    <div class="control-input clearfix">'+
				'				<div class="grid-range grid-range-time">'+
				'			      	<input name="beginDate" type="date" class="form-control">'+
				'			    </div>'+
				'				<div class="grid-range grid-range-i">'+
				'			      	<i>-</i>'+
				'			    </div>'+
				'			    <div class="grid-range grid-range-time">'+
				'			      	<input name="endDate" type="date" class="form-control">'+
				'			    </div>'+
				'		    </div>'+
				'		</div>'+
				'</script>';
	}
	var datatableForm_2 = function() {
		return 	'<script id="tpl_selfRecordList_datatableForm_2" type="text/html">'+
				'	{{include "tpl_selfRecordList_datatableForm_comm",value}}'+
				'	{{include "tpl_selfRecordList_datatableForm_age",value}}'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="pregnancyStatus" class="control-label">备孕状态</label>'+
				'	    <div class="control-input">'+
				'	      	<select id="pregnancyStatus" name="pregnancyStatus" class="form-control">'+
				'	      		<option value="">全部</option>'+
				'	      		<option value="1">备孕中</option>'+
				'	      		<option value="2">备孕成功</option>'+
				'	      	</select>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-3">'+
				'	    <label class="control-label">BMI</label>'+
				'	    <div class="control-input clearfix">'+
				'		    <div class="grid-range" style="width:72px">'+
				'		      	<input name="beginBMI" type="text" class="form-control" placeholder="最小值">'+
				'		    </div>'+
				'		    <div class="grid-range grid-range-i">'+
				'		      	<i>-</i>'+
				'		    </div>'+
				'		    <div class="grid-range" style="width:72px">'+
				'		      	<input name="endBMI" type="text" class="form-control" placeholder="最大值">'+
				'		    </div>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="weightSituation" class="control-label">体重情况</label>'+
				'	    <div class="control-input">'+
				'	      	<select id="weightSituation" name="weightSituation" class="form-control">'+
				'	      		<option value="">全部</option>'+
				'	      		<option value="0">低重</option>'+
				'	      		<option value="1">标准体重</option>'+
				'	      		<option value="2">超重</option>'+
				'	      		<option value="3">肥胖</option>'+
				'	      	</select>'+
				'	    </div>'+
				'	</div>'+
				'</script>';
	}
	var datatableForm_3 = function() {
		return 	'<script id="tpl_selfRecordList_datatableForm_3" type="text/html">'+
				'	{{include "tpl_selfRecordList_datatableForm_comm",value}}'+
				'	{{include "tpl_selfRecordList_datatableForm_age",value}}'+
				'	<div class="dt-card form-group grid-label-4">'+
				'	    <label for="parturientStatus" class="control-label">孕妇状态</label>'+
				'	    <div class="control-input">'+
				'	      	<select id="parturientStatus" name="parturientStatus" class="form-control">'+
				'	      		<option value="">全部</option>'+
				'	      		<option value="0">孕早期</option>'+
				'	      		<option value="1">孕中期</option>'+
				'	      		<option value="2">孕晚期</option>'+
				'	      		<option value="3">产褥期</option>'+
				'	      		<option value="4">产后期</option>'+
				'	      	</select>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-2">'+
				'	    <label class="control-label">孕周</label>'+
				'	    <div class="control-input clearfix">'+
				'	    	<div class="grid-range">'+
				'		      	<input name="preFrom-week" type="text" class="form-control" placeholder="周">'+
				'		    </div>'+
				'		    <div class="grid-range">'+
				'		      	<input name="preFrom-day" type="text" class="form-control" placeholder="日">'+
				'		    </div>'+
				'		    <div class="grid-range grid-range-i">'+
				'		      	<i>-</i>'+
				'		    </div>'+
				'		    <div class="grid-range">'+
				'		      	<input name="preTo-week" type="text" class="form-control" placeholder="周">'+
				'		    </div>'+
				'		    <div class="grid-range">'+
				'		      	<input name="preTo-day" type="text" class="form-control" placeholder="日">'+
				'		    </div>'+
				'	    </div>'+
				'	</div>'+
				'	<div class="dt-card form-group grid-label-3">'+
				'	    <label for="" class="control-label">预产期</label>'+
				'	    <div class="control-input clearfix">'+
				'			<div class="grid-range grid-range-time">'+
				'		      	<input name="beginExpectedDay" type="date" class="form-control">'+
				'		    </div>'+
				'			<div class="grid-range grid-range-i">'+
				'		      	<i>-</i>'+
				'		    </div>'+
				'		    <div class="grid-range grid-range-time">'+
				'		      	<input name="endExpectedDay" type="date" class="form-control">'+
				'		    </div>'+
				'	    </div>'+
				'	</div>'+
				/*'	<div class="dt-card form-group grid-label-4">'+
				'	    <label class="control-label">分娩天数</label>'+
				'	    <div class="control-input clearfix">'+
				'	    	<div class="grid-range">'+
				'		      	<input name="" type="text" class="form-control" placeholder="天">'+
				'		    </div>'+
				'		    <div class="grid-range grid-range-i">'+
				'		      	<i>-</i>'+
				'		    </div>'+
				'		    <div class="grid-range">'+
				'		      	<input name="" type="text" class="form-control" placeholder="天">'+
				'		    </div>'+
				'	    </div>'+
				'	</div>'+*/
				'</script>';
	}
	var datatableForm_serchBtn = function() {
		return 	'<script id="tpl_selfRecordList_datatableForm_serchBtn" type="text/html">'+
				'		<div class="dt-card form-group">'+
				'	      	<button type="button" class="btn btn-info" id="serchBtn">搜索</button>'+
				'		</div>'+
				'</script>';
	}
	var datatableBox = function() {
		return 	'<script id="tpl_selfRecordList_datatableBox" type="text/html">'+
				'	{{if kind=="1"}}'+
				'		 <th>档案编号</th>'+
                '        <th>姓名</th>'+
                '        <th>性别</th>'+
                '        <th>联系方式</th>'+
                '        <th>出生日期</th>'+
                '        <th>查看</th>'+
                '	{{else if kind=="2"}}'+
                '		 <th>档案编号</th>'+
                '        <th>姓名</th>'+
                '        <th>联系方式</th>'+
                '        <th>年龄</th>'+
                '        <th>备孕状态</th>'+
                '        <th>BIM</th>'+
                '        <th>体重情况</th>'+
                '        <th>查看</th>'+
                 '	{{else if kind=="3"}}'+
                '		 <th>档案编号</th>'+
                '        <th>姓名</th>'+
                '        <th>联系方式</th>'+
                '        <th>年龄</th>'+
                '        <th>所处阶段</th>'+
                '        <th>孕周/分娩时孕周</th>'+
                '        <th>分娩天数</th>'+
                '        <th>查看</th>'+
                '	{{/if}}'+
				'</script>';
	}

	return tpl;
});